package io;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2023-08-07
 * Time: 10:33
 */
public class IODemo2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        file.createNewFile();
        System.out.println(file.exists());//是否存在
        System.out.println(file.isFile());//是否是文件
        System.out.println(file.isDirectory());//是不是目录
    }
}
